// 导入请求函数
import request from "@/utils/http";

// 查询支付单
export function queryPayOrdersAPI() {
    return request({
        url: '/pay-orders',
        method: 'get'
    });
}

// 生成支付单
export function applyPayOrderAPI(applyDTO) {
    return request({
        url: '/pay-orders',
        method: 'post',
        data: applyDTO
    });
}

// 尝试基于用户余额支付
export function tryPayOrderByBalanceAPI(id, payOrderFormDTO) {
    return request({
        url: `/pay-orders/${id}`,
        method: 'post',
        data: payOrderFormDTO
    });
}
